//简单装饰器demo
@testDec
class Demo{

}

function testDec(target) {
    target.isDec = true
}

console.log("装饰器使用@符号,不带参数，打印出"+Demo.isDec)

//带参数的:
@testDec1(false)
class Demo1{

}

function testDec1(proc) {
    return (target)=>{
        target.isDec1 = proc
    }
}

console.log("装饰器使用@符号,带参数，打印出"+Demo1.isDec1)
export default {
    Demo,
    Demo1
}